<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">

		<title>My JSP 'login.jsp' starting page</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">

		<script type="text/javascript"
			src="<%=basePath%>js/jquery-1.8.0.min.js"></script>
		<script type="text/javascript"
			src="<%=basePath%>js/ajaxform/jquery.form.js"></script>
		<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
		<script type="text/javascript">

	$(document).ready(function(){
	  	$('#loginForm').ajaxForm(function(data){
			data=$.parseJSON(data);
			if(data&&data.state){
	       	  window.location.href="<%=basePath%>adminIndex.action"
			}else{
				alert(data.msg);
			}
			return false;
	        });
	});
	
        
        	</script>

	</head>

	<body>
		<form action="sys/login.action" method="post" id="loginForm">
			o帐号：
			<input type="text" name="userName" id="userName">
			密码：
			<input type="text" name="password" id="password">
			验证码：
			<input type="text" name="validateCode" id="validateCode">
			<img src="common/validateCode.action" style="cursor: pointer"
				onClick="javascript:this.src='common/validateCode.action?x='+((new Date()).getTime());">
			<input type="submit" value="登录">
		</form>

	</body>
</html>
